import {NoMatch} from "../pages/home";
import React,{lazy} from "react"
import {
    UnorderedListOutlined,
    NotificationOutlined,
    UserOutlined,
    CopyOutlined,
    BulbOutlined,
    CoffeeOutlined
} from '@ant-design/icons';

const router = [
    {
        path: "/todoList",
        key: "/todoList",
        component: lazy(()=>import ('../components/toDoList/index')),
        label: "TodoList",
        icon: <UnorderedListOutlined/>,
    },
    {
        path: "/map",
        key: "/map",
        label: "map",
        component: lazy(()=>import('../pages/map/index.jsx')),
        icon: <NotificationOutlined/>,
        children: [
            {
                path: "/clearOverlays",
                key: "/clearOverlays",
                // label: "清除覆盖物",
                label: '清除覆盖物',
                component: lazy(()=>import('../pages/map/children/clearOverlays/index.jsx')),
                icon: <UserOutlined/>
            },

        ]
    },
    {
        path: "/reduxDemo",
        key: "/reduxDemo",
        label: "redux练习",
        component: lazy(()=>import('../pages/reduxDemo/index.jsx')),
        icon: <UserOutlined/>,
    },
    {
        path: "/td",
        key: "/td",
        label: "停电",
        component: lazy(()=>import('../pages/td/index.jsx')),
        icon: <CopyOutlined/>,
    },
    {
        path: "/hooks",
        key: "/hooks",
        label: "hooks",
        component: lazy(()=>import('../pages/hooks/index.jsx')),
        icon: <BulbOutlined/>,
    },
    {
        path: "/crud",
        key: "/crud",
        label: "crud",
        component: lazy(()=>import('../pages/crud/index.jsx')),
        icon: <CoffeeOutlined/>
    },
    {
        path: "*",
        component: NoMatch,
    },

]
export default router
